package org.feng.controller;

import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.feng.base.entity.Result;
import org.feng.service.SmsService;
import org.feng.vo.SmsMessageVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author feng
 * @Date 2022/6/6 17:45
 * @Description 发送短信
 */
@RestController
@RequestMapping("/sms/message")
@AllArgsConstructor
@Api(tags = "发送短信")
public class SmsController {

    private SmsService smsService;

    @PostMapping("/sendMessage")
    public Result<Boolean> sendMessage(@RequestBody SmsMessageVO message) {
        return Result.success(smsService.sendMessage(message));
    }
}
